GetDirectoryNames

Returns an array of all subdirectory names from a directory or only the subdirectory names that match a search pattern.

Syntax

GetDirectoryNames("DirectoryPath", "SearchPattern")

Arguments

Argument Description
DirectoryPath Full path to the directory to search. See Identifying files and directories in statements for information about configuring full paths relative to the workspace or script directory.
SearchPattern Optional text pattern to search for. Can use a combination of literal and wildcard characters. Use an asterisk (*) to match zero or more characters. Use a question mark (?) to match zero or one character. Regular expressions are not supported.

Return value

Value Description
Value Array of subdirectory names from the directory.

Example

GetDirectoryNames("C:\\Testing\\", "Data*")